﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class rxt_gpzj_Add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Gpzj c = new Gpzj();
        c.Name = txtTitle.Text;
        c.Link = txtUrl.Text;
        c.MrTime = DateTime.Parse(txtMrTime.Text);
        if (rdoUP.Checked)
            c.UpDown = "↑" + txtZf.Text;
        else
            c.UpDown = "↓" + txtZf.Text;
        GpzjBLL bll = new GpzjBLL();
        if (bll.InsertGpzj(c))
        {
            ClientScript.RegisterStartupScript(GetType(), "a", "alert('添加成功');document.location='rxtGpzj.aspx'", true);
        }
        else
        {
            ClientScript.RegisterStartupScript(GetType(), "a", "alert('添加失败');", true);
        }
    }
}